<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
    <link rel="stylesheet" href="css/bootstrap-responsive.min.css"  type="text/css">
    <link rel="stylesheet" href="css/font-awesome.min.css"  type="text/css">
    <link rel="stylesheet" href="css/ace.min.css"  type="text/css">
    <link rel="stylesheet" href="css/ace-skins.min.css"  type="text/css">
    <link rel="stylesheet" href="css/ace-responsive.min.css"  type="text/css">

    <script src="js/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="js/bootstrap.min.js" type="text/javascript"></script>
    <script src="js/bootbox.min.js" type="text/javascript"></script>
</head>

<style>
    #page-content{
        position: relative;
        left:-10%;
        margin-top: 5%;
    }

</style>

<body>
<div id="main-content" class="clearfix">
    <div id="page-content" class="clearfix">

        <div class="goods-header">
            <div class="goods-header-left" ><img src="" alt="" width="100px" height="100px" id="pic"/></div>
            <div class="goods-header-right">
                <p id="one" style="font-size: 23px"></p>
                <p id="two" style="font-size: 18px"></p>
                <p id="there" style="font-size: 18px"></p>
                <p id="four" style="font-size: 18px"></p>
                <p id="five" style="font-size: 18px"></p>

                <!--<button class="btn btn-primary"><a style="color:#fff" href="../../../../../Desktop/UI/跨境电商借卖平台原型/跨境电商借卖平台原型/bvo-goodsstorechoose.html">Dropship Now</a></button>-->
                <!--<button class="btn btn-primary">Add to Wish List</button>-->
            </div>
        </div>

        <h4 class="lighter">Item Description</h4>
        <div class="tabbable">
            <ul class="nav nav-tabs" id="myTab">
                <li class="active"><a data-toggle="tab" href="#ebay" style="font-size: 18px"> ebay description</a></li>
                <li class=""><a data-toggle="tab" href="#Amazon" style="font-size: 18px">Amazon description</a></li>
            </ul>
            <div class="tab-content">
                <div id="ebay" class="tab-pane active" style="font-size: 15px">

                </div>
                <div id="Amazon" class="tab-pane" style="font-size: 15px">

                </div>
            </div>
        </div>
<!--<a href="#"></a>-->
    </div>
</div>
<script>


    $(function () {
        var url=location.search;
        var Request = new Object();
        if(url.indexOf("?")!=-1){
            var str = url.substr(1)　//去掉?号
            strs = str.split("&");
            for(var i=0;i<strs.length;i++){
                Request[strs[i ].split("=")[0]]=unescape(strs[i].split("=")[1]);
            }
        }


        var brandid = Request["brandid"]
        var nu = Request["num"]
        var id = Request["id"]
        $.ajax({
            type:"post",
            url:"/brand/selectBrandById",
            dataType:"json",
            async:false,
            data:{id:brandid},
            success:function (brand) {


                $('#four').html('品牌名称：'+'<a href="#">'+brand.name + '</a>')

                $.ajax({
                    type:"post",
                    url:"/goods/searchGoodsByID",
                    dataType:"json",
                    async:false,
                    data:{id:id},
                    success:function (good) {
                        $('#one').html('商品标题：'+'<a href="#">'+good.title + '</a>')
                        $('#two').html('商品价格：'+'<a href="#">￥'+good.price + '</a>')
                        $('#there').html('SKU编码：'+'<a href="#">'+good.sku + '</a>')
                        $('#five').html('商品库存：'+'<a href="#">'+nu + '</a>')
                        $('#ebay').html(good.ebayDescription)
                        $('#Amazon').html(good.amazonDescription)
                        $('#pic').attr("src" , "/image/"+good.image)
                    },
                    error:function () {
                        alert("获取信息失败")
                    }
                })
            },
        	error:function () {
               alert("获取信息失败")
            }
        })
        // <a href="#"></a>
        // '商品標題：' + title

    })

    //将需要修改信息的商品ID传到该页面
    // $("#index").attr('href','/role?uid='+mvo_id);
</script>
</body>
</html>
